package com.yunhe.log.service.data;

import com.yunhe.common.model.PageParam;
import com.yunhe.log.domain.data.SystemMonitorLog;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.exception.UniqueConstraintsException;

import java.sql.Time;
import java.util.Date;
import java.util.List;

/**
 * 系统操作记录Service
 * @desc 系统操作记录服务类定义
 * @author liuronglei
 */
public interface SystemMonitorLogService {

    /**
     * 新增系统操作记录对象
     * @param systemMonitorLog 系统操作记录对象
     */
    SystemMonitorLog createSystemMonitorLog(SystemMonitorLog systemMonitorLog)
            throws ArgumentErrorException, UniqueConstraintsException;

    /**
     * 批量新增系统操作记录对象
     * @param systemMonitorLogList 系统操作记录对象列表
     */
    Iterable<SystemMonitorLog> createSystemMonitorLog(List<SystemMonitorLog> systemMonitorLogList)
            throws ArgumentErrorException, UniqueConstraintsException;

    void deleteById(Long id);

    /**
     * 更新系统操作记录
     */
    SystemMonitorLog updateSystemMonitorLog(Long id,
                                            Date date,
                                            Time time,
                                            Long typeCode,
                                            String type,
                                            String content)
            throws ObjectNotFoundException, UniqueConstraintsException, ArgumentErrorException;

    SystemMonitorLog updateSystemMonitorLog(SystemMonitorLog systemMonitorLog)
            throws ObjectNotFoundException, UniqueConstraintsException, ArgumentErrorException;

    /**
     * 根据条件获得系统操作记录对象列表
     * @param dtime
     * @param time
     * @param typeCode
     * @param typeTitle
     * @param content
     * @param pageParam 分页对象
     */
    Iterable<SystemMonitorLog> findSystemMonitorLogs(List<Date> dtime,
                                                     Time time,
                                                     List<Long> typeCode,
                                                     String typeTitle,
                                                     String content,
                                                     PageParam pageParam);

    SystemMonitorLog createExportRecord(Long firmCode, String menu, Long userId);
}
